#include "ArcherTower.h"
#include "ResourcesManager.h"

ArcherTower::ArcherTower()
{
    static SDL_Texture* tex_archer = ResourcesManager::Instance().texturePool[ResID::Tex_Archer];

    static const std::vector<int> idx_list_idle_up = { 3, 4 };
    static const std::vector<int> idx_list_idle_down = { 0, 1 };
    static const std::vector<int> idx_list_idle_left = { 6, 7 };
    static const std::vector<int> idx_list_idle_right = { 9, 10 };
    static const std::vector<int> idx_list_fire_up = { 15, 16, 17 };
    static const std::vector<int> idx_list_fire_down = { 12, 13, 14 };
    static const std::vector<int> idx_list_fire_left = { 18, 19, 20 };
    static const std::vector<int> idx_list_fire_right = { 21, 22, 23 };

    animIdleUp.SetFrameData(tex_archer, 3, 8, idx_list_idle_up);
    animIdleDown.SetFrameData(tex_archer, 3, 8, idx_list_idle_down);
    animIdleLeft.SetFrameData(tex_archer, 3, 8, idx_list_idle_left);
    animIdleRight.SetFrameData(tex_archer, 3, 8, idx_list_idle_right);
    animFireUp.SetFrameData(tex_archer, 3, 8, idx_list_fire_up);
    animFireDown.SetFrameData(tex_archer, 3, 8, idx_list_fire_down);
    animFireLeft.SetFrameData(tex_archer, 3, 8, idx_list_fire_left);
    animFireRight.SetFrameData(tex_archer, 3, 8, idx_list_fire_right);

    size.x = 48, size.y = 48;

    towerType = TowerType::Archer;

    fireSpeed = 6;
    bulletType = BulletType::Arrow;
}
